// 初始样式
require('../../assets/css/index.less');
require('../../assets/css/basic.less');
// 小图标
require('../../assets/fonts/iconfont.css');
require('../../assets/font/iconfont.css');
// 当前页面样式
require('./badges.less');
// 引入weui
require("../../lib/weui/weui.css")
var weui = require("../../lib/weui/weui.js")
    // 轮播图
import Swiper, { Pagination, Autoplay } from 'swiper';
import 'swiper/swiper-bundle.css';
// 工具函数 utils
const dom = require('../../utils/dom');
var https = require('../../utils/https');
const local = require('../../utils/local');
dom.ready(function() {

    dom.addEvent(".returnBtn", "click", function() {
        history.go(-1)
    });
    //
    https.get("/api/exercise/badge", function(res) {
        var { errno, data } = res;
        if (errno == 0) {
            console.log(data);
        }
    });
    //
    var lis = document.querySelectorAll(".badgeList ul li")
    lis.forEach(function(v) {
        v.addEventListener("click", function() {
            location.href = './badgeDetail.html'
        })
    })
})